package com.game.backend.mapper;

import com.game.backend.model.RankUser;
import com.game.backend.model.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {
    List<User> getAll();

    User getByUsername(@Param("username")String username);

    User getById(@Param("id")int id);

    void add(@Param("username")String username,
            @Param("password")String password);

    int updateRating(@Param("id")int id,@Param("rating")int rating);

    List<RankUser> getRankList(@Param("page") Integer page,@Param("size") Integer size);

    Integer getCount();
}
